﻿<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="styles.css" />
</head>
<body>
    <div id="app">
        <div class="sidebar" v-if="directoryInfo">
            <ul class="entries">
                <li v-if="!directoryInfo.isRoot">
                    <a href v-on:click="navigateTo('..', $event)">..</a>
                </li>
                <li v-for="item in directoryInfo.directories">
                    <a href v-on:click="navigateTo(item.name, $event)">{{ item.name }}</a>
                </li>
                <li v-for="item in directoryInfo.files">
                    <a href v-on:click="showFile(item.fullName, $event)">{{ item.name }}</a>
                </li>
            </ul>
        </div>
        <div class="viewer">
            <div v-if="fileInfo">
                <h3>{{ fileInfo.name }} ({{ fileInfo.size }} bytes)</h3>
                <div class="file-contents">{{ fileInfo.text }}</div>
            </div>
        </div>
    </div>

    <script src="vue.js"></script>
    <script src="app.js"></script>
</body>
</html>
